<template>
	<view class="topbar">
		<view class="topbar-left" @click="backTo"><slot name="left"></slot></view>
		<view class="topbar-middle"><slot name="middle"></slot></view>
		<view class="topbar-right"><slot name="right"></slot></view>
	</view>
</template>

<script>
	export default{
		methods:{
			backTo(){
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style scoped>
	.topbar{
		height: 105rpx;
		display: flex;
		margin: 0rpx 40rpx;
		align-items: center;
		text-align: center;
		z-index: 100;
	}
	.topbar-left{
		width: 20%;
		display: flex;
		align-items: center;
		color: #0c34ba;
	}
	.topbar-middle{
		width: 60%;
		font-size: 30rpx;
		font-weight: bold;
	}
	.topbar-right{
		width: 20%;
		text-align: right;
	}
</style>
